<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>班级维护</title>
<%@include file="/view/common/js-css.jsp" %>
</head>
<body>
<div id="frameWrapper" class="frameWrapper">
	<div class="titlebar">
		<p>当前位置：班级管理<span>/</span>班级维护</p>
	</div>
	<div class="searchbar">
		<form method="post" action="GradeServlet?command=query">
			<div id="input">
				<div class="inputwraper">
					<span style="margin-left:30px">班级信息列表>></span>
				</div>
				<div class="clear"></div>
			</div>
		</form>
	</div>
	<div id="table-wrap">
		<table border="1">
			<thead>
				<tr>
					<th>编号</th>
					<th>班级名称</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			<c:forEach items="${pageModel.list }" var="grades" varStatus="v">
				<tr>
					<td>${v.count }</td>
					<td>${grades.grade_name }</td>
					<td class="do">
						<a class="btn btn-del" href="${pageContext.request.contextPath }/GradeServlet?command=delete&gradeId=${grades.grade_id}"><i class="fa fa-trash"></i>删除</a>
						<a href="${pageContext.request.contextPath }/GradeServlet?command=preUpdate&gradeId=${grades.grade_id}" class="btn btn-update"><i class="fa fa-pencil"></i>修改</a>
					</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<div id="paging">
			<a href="GradeServlet?command=query&currentPage=1" class="btn btn-getionfo">首页</a>
			<a href="GradeServlet?command=query&currentPage=${pageModel.currentPage-1<1?1:pageModel.currentPage-1}" class="btn btn-getionfo">上一页</a>
			&nbsp;&nbsp;&nbsp;&nbsp;
			共<span>${pageModel.pageTotal }</span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			当前第<span>${pageModel.currentPage }</span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="GradeServlet?command=query&currentPage=${pageModel.currentPage+1>pageModel.pageTotal?pageModel.pageTotal:pageModel.currentPage+1 }" class="btn btn-getionfo">下一页</a>
			<a href="GradeServlet?command=query&currentPage=${pageModel.pageTotal }" class="btn btn-getionfo">末页</a>
		</div>
	</div>
</div>
</body>
</html>